#define _CRT_SECURE_NO_WARNINGS 1
#include"Heap.h"

void HeapTest()
{
	HP phead;
	HaepInit(&phead);
	int a[] = { 10,15,56,25,30,70,50 };
	for (int i = 0; i < sizeof(a)/sizeof(a[0]); i++)
	{
		HeapPush(&phead, a[i]);
	}
	while (!HeapEmpty(&phead))
	{
		int top=HeapTop(&phead);
		printf("%d ", top);
		HeapPop(&phead);
	}

	HeapDestory(&phead);
}

int main()
{
	/*HeapTest();*/
	int a[] = { 7,8,3,5,1,9,5,4 };
	HeapSort(a, sizeof(a) / sizeof(a[0]));
	return 0;
}